package com.devshephard.business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.web.bind.annotation.*;


@RestController
public class TestEventController {

    @Autowired
    ApplicationEventPublisher publisher;

    @RequestMapping("/event")
    @ResponseBody
    public String queryUserInfo() {
        publisher.publishEvent(new MyApplicationEvent(this));
        return "时间监听测试";
    }

}
